<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>东陆高新LORA管理系统</title>
		<link rel="stylesheet" type="text/css" href="jquery-easyui-1.5.2/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="jquery-easyui-1.5.2/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="jquery-easyui-1.5.2/demo.css">
		<link rel="stylesheet" type="text/css" href="style/syExtIcon.css">
		<link rel="stylesheet" type="text/css" href="style/index.css">
		<link rel="icon" type="image/x-icon" href="/image/carpark_32.png">

		<script type="text/javascript" src="jquery-easyui-1.5.2/jquery.min.js"></script>
		<script type="text/javascript" src="jquery-easyui-1.5.2/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="js/syExtEasyUI.js"></script>
		<script type="text/javascript" src="js/syExtJquery.js"></script>
		<script type="text/javascript" src="js/index.js"></script>
		<script type="text/javascript">
			var _menus = {
				"menus": [{
						"menuid": "1",
						"icon": "ext-icon-carparkIcon",
						"menuname": "LORA管理",
						"menus": [{
								"menuid": "11",
								"menuname": "基站列表",
								"icon": "ext-icon-carparkIcon",
								"url": "/html/stationManage.html",
							},
							{
								"menuid": "12",
								"menuname": "节点列表",
								"icon": "ext-icon-carparkIcon",
								"url": "/html/user/userManage.html",
							},
							{
								"menuid": "13",
								"menuname": "节点设置",
								"icon": "ext-icon-carparkIcon",
								"url": "/html/visitor/visitorManage.html",
							}
						]
					}
				]
			};

			var mainTabs;
			$(function() {
				mainTabs = $('#tabs').tabs({
					fit: true,
					border: false,
				});

			});

			function refreshSelectedTab() {
				var panel = mainTabs.tabs('getSelected').panel('panel');
				var frame = panel.find('iframe');
				try {
					if(frame.length > 0) {
						for(var i = 0; i < frame.length; i++) {
							frame[i].contentWindow.document.write('');
							frame[i].contentWindow.close();
							frame[i].src = frame[i].src;
						}
						if(navigator.userAgent.indexOf("MSIE") > 0) { // IE特有回收内存方法
							try {
								CollectGarbage();
							} catch(e) {}
						}
					}
				} catch(e) {}
			}

			function addTab(subtitle, url, icon) {
				if(!$('#tabs').tabs('exists', subtitle)) {
					$('#tabs').tabs('add', {
						title: subtitle,
						content: createFrame(url),
						closable: true,
						icon: icon,
						tools: '#p-tools'
					});
				} else {
					$('#tabs').tabs('select', subtitle);
				}
				tabClose();
			}

			function createFrame(url) {
				var s = '<div style="height: 100%; width: 100%;overflow:hidden"><iframe scrolling="auto" frameborder="no" style="height: 100%; width: 100%" src="' + url + '"></iframe></div>';
				return s;
			}

			function loginout() {
				$.post("/loginout", function(data) {
					if(data.success) {
						window.location.href = "login.html";
					}
				});
			}

			function midifyPwd() {
				var dialog = $("#passwordDialog").dialog({
					width: 240,
					height: 200,
					title: '修改密码',
					modal: true,
					buttons: [{
						text: '保存',
						handler: function() {
							if(!$("#modifyPwdForm").form("validate")) {
								return;
							}
							var d = sy.serializeObject($("#modifyPwdForm"));
							$.post("/modifypwd", d, function(data) {
								sy.info(data.msg)
								if(data.success) {
									dialog.dialog("close");
								}
							});
						}
					}, {
						text: '关闭',
						handler: function() {
							dialog.dialog("close");
						}
					}]
				});
			}
		</script>
	</head>

	<body id="mainLayout" class="easyui-layout">
		<div data-options="region:'north'" style="height: 70px; overflow: hidden;background-color: transparent;" >
			<div class="logo" style="width: 64px;height: 64px;margin-left: 20px;"></div>
			<div style="position: absolute; left: 100px;top: 15px;"><span style="font-size: 30px;">东陆高新LORA管理中心</span></div>
			<div id="sessionInfoDiv" style="position: absolute; right: 100px; top: 25px;">
				欢迎您：<span id="userName">hjx</span>
				<a href="javascript:void(0)" onclick="midifyPwd();">修改密码</a>
				<a href="javascript:void(0)" onclick="loginout();">安全退出</a>
			</div>
		</div>
		<div data-options="region:'west',split:true" title="系统菜单" style="width: 200px; padding: 0px;margin: 0px;">
			<div id="nav">
				<!--  导航内容 -->

			</div>
		</div>
		<div data-options="region:'center'" style="overflow: hidden;">
			<div id="tabs" class="easyui-tabs" fit="true" border="false">
				<div title="首页">
					<div style="width: 100%;height: 100%;overflow: hidden;"><img src="image/index.jpg" style="width: 100%;height: 100%;" /></div>
				</div>
			</div>
		</div>
		<div data-options="region:'south',border:false" style="height: 30px;line-height: 30px; overflow: hidden;text-align: center;">
			<a href="http://www.dongluhitec.com/" target="_blank">Copyright © 东陆高新  联系电话:0755-26992770</a>
		</div>

		<div id="loginDialog" title="解锁登录" style="display: none;">
			<form method="post" class="form" onsubmit="return false;">
				<table class="table">
					<tr>
						<th width="50">登录名</th>
						<td>hjx</td>
					</tr>
					<tr>
						<th>密码</th>
						<td><input name="data.pwd" type="password" class="easyui-validatebox" data-options="required:true" /></td>
					</tr>
				</table>
			</form>
		</div>

		<div id="passwordDialog" title="修改密码" style="display: none;">
			<form id="modifyPwdForm" method="post" class="form" onsubmit="return false;" style="width: 180px;margin: auto;">
				<table class="table">
					<tr>
						<th>旧 密 码</th>
						<td><input name="oldPwd" type="password" style="width: 100px;" class="easyui-textbox" data-options="required:true" /></td>
					</tr>
					<tr>
						<th>新 密 码</th>
						<td><input id="pwd" name="newPwd" type="password" style="width: 100px;" class="easyui-textbox" data-options="required:true" /></td>
					</tr>
					<tr>
						<th>重复密码</th>
						<td><input type="password" name="reNewPwd" style="width: 100px;" class="easyui-textbox" data-options="required:true,validType:'eqPwd[\'#pwd\']'" /></td>
					</tr>
				</table>
			</form>
		</div>

		<div id="mm" class="easyui-menu" style="width:150px;">
			<div class="menu-sep"></div>
			<div id="refresh">刷新</div>
			<div id="close">关闭</div>
			<div id="closeall">全部关闭</div>
			<div id="closeother">除此之外全部关闭</div>
			<div class="menu-sep"></div>
			<div id="closeright">当前页右侧全部关闭</div>
			<div id="closeleft">当前页左侧全部关闭</div>
			<div class="menu-sep"></div>
			<div id="exit">退出</div>
		</div>
		<div id="p-tools">
			<!--<a href="javascript:void(0)" class="icon-mini-refresh" onclick="refreshSelectedTab();"></a>-->
		</div>
	</body>

</html>